package com.sali.b_design_pattern.e_template_pattern.lesson_interface;

/**
 * @description:
 * @author: zhang hang
 * @date: 2023/3/20 21:30.
 * @version: 1.0
 */
public class LessonInterfaceStarter {

    public static void main(String[] args) {
        CourseTemplate2 courseTemplate2 = new CourseTemplate2();
        courseTemplate2.createCourse(() -> System.out.println("我要编写java作业"));

        System.out.println("====");

        CourseTemplate2 courseTemplate3 = new CourseTemplate2();
        courseTemplate3.createCourse(new ICourseCallback() {
            @Override
            public boolean needHomeWork() {
                return true;
            }

            @Override
            public void checkHomeWork() {
                System.out.println("我要编写Go作业");
            }
        });
    }

}
